<!--{template admin/header}-->
<body id="homepage">
    <div id="breadcrumb">
        <ul>
            <li><img src="static/img/icons/icon_breadcrumb.png"
                     alt="Location" /></li>
            <li><strong>位置:</strong></li>
            <li><a href="admin.php">主页</a> - 话题统计</li>
        </ul>
    </div>
    <div id="rightside" class="count_topic user_info">
        <div class="contentcontainer">
            <div class="headings altheading">
                <h3>话题统计</h3>
            </div>
            <div class="contentbox">
                <div class="extrabottom">
                    <form method="get" action="admin.php" class="form-inline" role="form" >
                    	<div class="input-prepend" id="count_uid">
							<span class="add-on">用户</span>
							<input class="span2" id="prependedInput" type="text" placeholder="UID" name="uid" value="{$uid}" >
						</div>
                    	排序选择:
                       	 <select name="orderby"  class="span2" >
                       	 	<option value="response_num"{$orderbyArr[response_num]}>评论数</option>
                       	 	<option value="fav_num"{$orderbyArr[fav_num]}>收藏数</option>
                       	 	<option value="share_num"{$orderbyArr[share_num]}>分享数</option>
                       	 	<option value="view_num"{$orderbyArr[view_num]}>查看数</option>
                       	 	<option value="like_num"{$orderbyArr[like_num]}>喜欢数</option>
                       	 	<option value="recom_num"{$orderbyArr[recom_num]}>推荐数</option>
                       	 	<option value="time"{$orderbyArr[time]}>发布时间</option>
                       	 	<option value="last_reply"{$orderbyArr[last_reply]}>最后回应时间</option>
                       	 </select>
                       	  选择圈子:
                       	 <select name="gid" class="span2" >
                       	  <!--{loop $allGroups $value}-->
                       	  	<option value="{$value[gid]}"{$gidArr[$value[gid]]}>{$value[name]}</option>
                       	  <!--{/loop}-->
                       	 </select>
                       	 <select name="ordersc" class="span2" >
							<option value="desc"{$orderscArr['desc']}>降序</option>
                       	 	<option value="acs"{$orderscArr['acs']}>升序</option>
						</select>
                       	<select name="perpage" class="span2" >
                            <option value="20"{$perpageArr[20]}>每页显示20个</option>
                            <option value="50"{$perpageArr[50]}>每页显示50个</option>
                            <option value="100"{$perpageArr[100]}>每页显示100个</option>
                         </select>
                         <div id="show" class="input-prepend"  style="margin:10px 0px;">
                         	<span id='count_level' class="input-prepend">
					    		<span class="add-on">评论数</span>
					    		<input type='text' name='response_num1' class='span1' id="prependedInput" value="{$respArr[0]}"/>
					    		<input type='text' name='response_num2' class='span1' id="prependedInput" value="{$respArr[1]}"/>
					    	</span>
					    	<span id='count_level' class="input-prepend">
					    		<span class="add-on">查看数</span>
					    		<input type='text' name='view_num1' class='span1' id="prependedInput" value="{$viewArr[0]}"/>
					    		<input type='text' name='view_num2' class='span1' id="prependedInput" value="{$viewArr[1]}"/>
					    	</span>
					    	<span id='count_level' class="input-prepend">
					    		<span class="add-on">喜欢数</span>
					    		<input type='text' name='like_num1' class='span1' id="prependedInput" value="{$likeArr[0]}"/>
					    		<input type='text' name='like_num2' class='span1' id="prependedInput" value="{$likeArr[1]}"/>
					    	</span>
					    	<span id='count_level' class="input-prepend">
					    		<span class="add-on">推荐数</span>
					    		<input type='text' name='recom_num1' class='span1' id="prependedInput" value="{$recomArr[0]}"/>
					    		<input type='text' name='recom_num2' class='span1' id="prependedInput" value="{$recomArr[1]}"/>
					    	</span>
					    	<span id='count_level' class="input-prepend">
					    		<span class="add-on">发布时间</span>
					    		<input type='text' name='time1' class='span2' id="prependedInput" value="<!--{date('Y-m-d', $timeArr[0])}-->"/>
					    		<input type='text' name='time2' class='span2' id="prependedInput" value="<!--{date('Y-m-d', $timeArr[1])}-->"/>
					    	</span>
					    	<span id='count_level' class="input-prepend">
					    		<span class="add-on">回应时间</span>
					    		<input type='text' name='last_reply1' class='span2' id="prependedInput" value="<!--{date('Y-m-d', $replyArr[0])}-->"/>
					    		<input type='text' name='last_reply2' class='span2' id="prependedInput" value="<!--{date('Y-m-d', $replyArr[1])}-->"/>
					    	</span> 
                         </div>
                         <input type="hidden" value="count_topic" name="ac">
                         <input type="hidden" value="1" name="query">
                         <input type="submit" value="查询" class="btn" /> 
                    </form>
                </div>
                <div style="clear: both;"></div>
                <table width="100%" class="table table-striped">
                    <thead>
                        <tr>
                            <th>发布者</th>
                            <th>话题标题</th>
                            <th>评论数</th>
                            <th>收藏数</th>
                            <th>分享数</th>
                            <th>查看数</th>
                            <th>推荐数</th>
                            <th>最后回应时间</th>
                            <th>发布时间</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                    	<!--{loop $topicList $value}-->
                    	<tr>
                    		<td><a target="_blank" title="$value[user][nickname]" href="admin.php?ac=user&uid={$value[user][uid]}">{$value[user][nickname]}</a></td>
                    		<td><a target="_blank" title="$value[title]" href="admin.php?ac=count_topic&op=getTopicInfo&tid={$value[tid]}">{$value[title]}</a></td>
                    		<td>{$value[res_num]}</td>
                    		<td>{$value[fav_num]}</td>
                    		<td>{$value[share_num]}</td>
                    		<td>{$value[view_num]}</td>
                    		<td>{$value[recom_num]}</td>
                    		<td><!--{date('Y-m-d H:i:s',$value[last_reply])}--></td>
                    		<td><!--{date('Y-m-d H:i:s',$value[time])}--></td>
                    		<td><a target="_blank" href="admin.php?ac=topic&op=removeTopic&gid={$value[gid]}&tid={$value[tid]}&author_uid={$value[user][uid]}"><img width="24" height="24" src="static/img/icons/gif_delete.gif"></a></td>
                    	</tr>
                    	<!--{/loop}-->
                    </tbody>
                </table>
                <div class="extrabottom">
                    <ul>
                        <li><img src="static/img/icons/gif_people.gif" />作者信息</li>
                        <li>本次查询共有 {$total} 条记录</li>
                    </ul>
                    <div class="bulkactions">
                        <ul class="pagination">
                        	<li><a href="$firstpurl">首页</a></li>
                            <!--{if $currentPage > 1}-->
                            <li><a href="{$prevpurl}" title="">上一页</a></li>
                            <!--{/if}-->
                            <li><a href="$mpurl">第 {$currentPage} 页/共 {$totalPages} 页</a></li>
						    <!--{if  $currentPage < $totalPages}-->
						    <li><a href="$nextpurl">下一页</a></li>
						    <!--{/if}-->
						    <li><a href="$lastpurl">尾页</a></li>
                        </ul>
                        <div style="clear: both;"></div>
                    </div>
                </div>
                <div style="clear: both;"></div>
            </div>
        </div>
    </div>
    <!--{template admin/leftside}-->
    <!--{template admin/footer}-->